home *** CD-ROM | disk | FTP | other *** search
- /* Script um mit ScanQuix in ImageEngineer zu scannen,
- Scannersoftware laeuft auf der Workbench. */
-
- /* © 1997 by Volkmar Funke */
-
- /* $VER: ScanImage.rexx 1.0 (27.01.97) */
-
-
- address 'IMAGEENGINEER'
- options results
- options failat 25 /* ScanToDisk returns 0 or 20 */
-
- TRACE OFF
-
- tempfile='T:IE_ScannnedImage'
-
- ok=1
- call SCAN() /* Scans the image into a temporary file */
- call IMPORTGRAPHIC() /* Loads Image into ImageEngineer */
- call DELETEFILE() /* Removes temporary image file */
-
- EXIT
-
-
-
- SCAN:
- /* Scans the image into a temporary file using the program "ScanToDisk". */
- if not 1=open('path','ENV:ScanQuix/Path','READ') then do
- ok=0
- return
- end
-
- pragma('DIRECTORY',READLN('path'))
- address command 'ScanQuix3/ScanToDisk FILE="'tempfile'" TRUECOLOR NOICONS NOGUI PUBSCREEN=Workbench'
- if RC>=5 then do
- ok=0
- return
- end
-
- return
-
-
-
- IMPORTGRAPHIC:
- /* Loads the image into ImageEngineer */
- if ok=0 then
- return
-
- IE_TO_FRONT
-
- 'Open' tempfile
-
- if rc~=0 then do
- ADDRESS 'IMAGEENGINEER'
- REQUEST '"Scanner Fehler !!"' ' "OK" '
- EXIT
- end
-
-
-
- DELETEFILE:
- /* removes temporary file */
- address command 'delete >NIL: 'tempfile
-
- return
-